home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
COMAL
/
T-COMAL Today
/
(k)ta.d64
/
loadshape.proc
< prev
next >
Wrap
Text File
|
2007-02-28
|
743b
|
31 lines
9000 //
9010 PROC LOADSHAPE(SPR,FILENAME$) CLOSED
9020 DIM DS$ OF 2
9030 OPEN FILE 81,FILENAME$,READ
9040 DS$:=STATUS$
9050 IF DS$="00" AND SPR>=0 AND SPR<64 THEN
9060 A:=828
9070 POKE A+0,162 // LDX #81
9080 POKE A+1,81
9090 POKE A+2,32 // JSR $FFC6
9100 POKE A+3,198
9110 POKE A+4,255
9120 POKE A+5,160 // LDY #00
9130 POKE A+6,0
9140 POKE A+7,32 // LP JSR $FFCF
9150 POKE A+8,207
9160 POKE A+9,255
9170 POKE A+10,153 // STA SPR,Y
9180 POKE A+11,(49152+SPR*64) MOD 256
9190 POKE A+12,(49152+SPR*64) DIV 256
9200 POKE A+13,200 // INY
9210 POKE A+14,192 // CPY #64
9220 POKE A+15,64
9230 POKE A+16,208 // BNE LP
9240 POKE A+17,245
9250 POKE A+18,96 // RTS
9260 SYS A
9270 ENDIF
9280 CLOSE FILE 81
9290 ENDPROC LOADSHAPE